#ifndef VS1001K_H
 #define VS1001K_H

#define LEFT 1
#define RIGHT 2
#define BOTH 0

//Adresser på vs1001k chipen:
//Alle register blive fyldt med nul ved hardware reset.
#define MODE		0	//RW - mode control
#define	STATUS		1	//RW - Status af vs1001k
//#define INT_FCTRLH	2	//   - internal register, never use
#define CLOCKF		3	//RW - clock freq + doubler
#define DECODE_TIME	4	//R  - decode time in seconds
#define AUDATA		5	//R  - misc. audio data
#define WRAM		6	//W  - RAM write program
#define WRAMADDR	7	//W  - base address for RAM write
#define HDAT0		8	//R  - read header data
#define HDAT1		9	//R  - read header data
#define AIADDR		10	//RW - start address of application
#define VOL		11	//RW - volume control
//#define RESERVED	12	//   - reserved for vs1002 use, don't touch
#define AICTRL(x)	(13+x)	//RW - 2 application control registers, x = [0...1]


void VS1001k_init();
void VSSoundTest(unsigned char channel, unsigned char N);
unsigned char VSread(unsigned char addr, unsigned char byte_high, unsigned char byte_low);
unsigned char VSwrite(unsigned char addr, unsigned char byte_high, unsigned char byte_low);
//unsigned char VSSendCmd(unsigned char cmd);
//unsigned char VSSendData(unsigned char data);
unsigned char VSMemTest();
void mode();
void FastForward();
void Differential();
void SoftReset();
void PowerDown();
void BassTreble();
void DclkActive();
void BitOrder();

#endif
